<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <div>Document</div>
        
        <script type="module">
            function fn(num) {
                let res = [];
                for (let i = 0; i <= num; i++) {
                    let row = new Array(i + 1).fill(1);
                    for (let j = 1; j < row.length - 1; j++) {
                        row[j] = res[i - 1][j - 1] + res[i - 1][j];
                    }
                    res.push(row);
                }
                return ret;
            }
        </script>
    </body>
</html>
